﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AuthorityList.aspx.cs" Inherits="MyWorkspace.AuthorityList" EnableEventValidation="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Authority List</title>
    <style type="text/css">
        .style1
        {
            color: black;
        }
        .style2
        {
            font-size: x-large;
            font-family: "Times New Roman", Times, serif;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <strong>
    <br class="style2" />
    <span class="style2">Authority List</span></strong><br />
    <%--<asp:Panel ID="SearchAuthority" runat="server" ForeColor="Blue" 
        GroupingText="Search Authority" Height="103px" Width="973px">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="style1">Authority&nbsp; Name&nbsp;&nbsp;&nbsp; </span>
        <asp:TextBox ID="AuthorityName" runat="server" Height="20px" Width="159px"></asp:TextBox>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="style1">&nbsp; Level&nbsp;&nbsp;&nbsp;&nbsp; </span>
        <asp:DropDownList ID="ChooseLevel" runat="server" Height="16px" Width="108px">
        </asp:DropDownList>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="SearchButton" runat="server" Text="Search" Width="78px" />
        <br />
        <br />
        <br />
    </asp:Panel>--%>
    <p>
        &nbsp;</p>
    <asp:Panel ID="ListAuthority" runat="server" ForeColor="Blue" 
        GroupingText="Authority List" Height="349px" Width="465px">
        &nbsp; &nbsp;&nbsp;
        <br />
        &nbsp;&nbsp;&nbsp;
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="CreateButton" runat="server" Text="Create New Authority"
            Width="155px" onclick="CreateButton_Click" />
        <br />
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <br />
        <table class="style1">
        <asp:Repeater ID="Reapeater1" runat="server" >
        <HeaderTemplate>
        <tr>
        <%--<td width="90" height="30"><font face="Times New Roman">AuthorityId</font></td>--%>
        <td width="110" height="30"><font face="Times New Roman">AuthorityName</font></td> 
        <td width="110" height="30"><font face="Times New Roman">LevelName</font></td>
        <td width="280" height="30"><font face="Times New Roman"> </font></td>
        </tr>
        </HeaderTemplate>
        <ItemTemplate>
        <tr>
        <%--<td width="90" height="30"><%#DataBinder.Eval(Container.DataItem,"AuthorityId") %></td>--%>
        <td width="90" height="30"><%#DataBinder.Eval(Container.DataItem,"AuthorityName") %></td>
        <td width="90" height="30"><%#DataBinder.Eval(Container.DataItem, "Level.LevelName")%></td>

        <td width="280" height="30">
        <asp:Button ID="UpdateButton" CommandArgument= '<%#Eval("AuthorityId") %>' runat="server" Text="Update"
            Width="55px" onclick="UpdateButton_Click" />
        <asp:Button ID="DeleteButton" CommandArgument= '<%#Eval("AuthorityId") %>' runat="server" Text="Delete"
            Width="55px" onclick="DeleteButton_Click" />
        </td>
        </tr>
        </ItemTemplate>
        </asp:Repeater>
        </table>
    </asp:Panel>
    </form>
</body>
</html>
